﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using MongoDB.Bson;
using System.ComponentModel.DataAnnotations;

namespace Chaine.Models
{
    public class EmailTemplateModels
    {
        public EmailTemplateModels() { }
        public EmailTemplateModels(EmailTemplateType type)
        {
            this.Type = type;
            this.Title = this.Type.ToString();
        }

        public ObjectId Id { get; set; }
        public EmailTemplateType Type { get; set; }
        [Required]
        public string Title { get; set; }
        [Required]
        public string Content { get; set; }
        [Required]
        public string FromName { get; set; }

        [Required]
        [DataType(DataType.EmailAddress)]
        public string FromEmail { get; set; }

    }

    public enum EmailTemplateType
    {
        AlertNewMember,
        VerifyEmail,
        ResetPassword,
    }
}